#ifndef FRIENDLISTBUTTON_H
#define FRIENDLISTBUTTON_H
#include <QPushButton>
#include "itembutton.h"

class FriendListButton:public QLabel
{
public:
    FriendListButton(QWidget *parent = nullptr);
    void setListName(QString name);
    void setOnlineNum(int num);
    void setTotalNum(int totalNum);
    void drawFriendList();
    void mousePressEvent(QMouseEvent* event);

public:
    int defaultHeight = 30;
    bool isSpread = false;//是否暂开，默认否
    QVector<ItemButton*> itemList;

private:
    QString listName = "";
    int onlineNum = 0;
    int totalNum = 0;
    //左边折叠箭头label
    QLabel* leftArrowLabel = nullptr;
};

#endif // FRIENDLISTBUTTON_H
